<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>JavaScript数据类型 | 个人笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/js/数据类型的转换.html" />
    
    
    <link rel="prev" href="../../md/js/js的介绍.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="3.1"
        data-chapter-title="JavaScript数据类型"
        data-filepath="md/js/JavaScript数据类型.md"
        data-basepath="../.."
        data-revision="Sat Oct 13 2018 16:22:38 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/html/html介绍.html">
            
                
                    <a href="../../md/html/html介绍.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        html介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/html/html常用标签.html">
            
                
                    <a href="../../md/html/html常用标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        html常用标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/html/a标签的使用.html">
            
                
                    <a href="../../md/html/a标签的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        a标签的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="md/html/表格的介绍.html">
            
                
                    <a href="../../md/html/表格的介绍.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        表格的介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="md/html/列表.html">
            
                
                    <a href="../../md/html/列表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="md/html/iframe内嵌框架.html">
            
                
                    <a href="../../md/html/iframe内嵌框架.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        iframe内嵌框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="md/html/表单.html">
            
                
                    <a href="../../md/html/表单.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="md/html/媒体标签.html">
            
                
                    <a href="../../md/html/媒体标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        媒体标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="md/html/下拉框，多行文本域以及对齐方式.html">
            
                
                    <a href="../../md/html/下拉框，多行文本域以及对齐方式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        清除样式
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/css/css引入方式.html">
            
                
                    <a href="../../md/css/css引入方式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        css引入方式
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/css/css选择符与选择器.html">
            
                
                    <a href="../../md/css/css选择符与选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        css选择符与选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/css/css字体样式.html">
            
                
                    <a href="../../md/css/css字体样式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        css字体样式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="md/css/图片的调整.html">
            
                
                    <a href="../../md/css/图片的调整.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        图片的调整
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="md/css/伪类选择.html">
            
                
                    <a href="../../md/css/伪类选择.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        伪类选择
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="md/css/盒子模型.html">
            
                
                    <a href="../../md/css/盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="md/css/浮动.html">
            
                
                    <a href="../../md/css/浮动.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="md/css/定位.html">
            
                
                    <a href="../../md/css/定位.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="md/css/阴影.html">
            
                
                    <a href="../../md/css/阴影.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        阴影
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="md/css/图片溢出处理.html">
            
                
                    <a href="../../md/css/图片溢出处理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        图片溢出处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="md/css/动画.html">
            
                
                    <a href="../../md/css/动画.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        动画
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="md/css/动画插件与浏览器内核.html">
            
                
                    <a href="../../md/css/动画插件与浏览器内核.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.11.</b>
                        
                        动画插件与浏览器内核
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.12" data-path="md/css/旋转菜单.html">
            
                
                    <a href="../../md/css/旋转菜单.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.12.</b>
                        
                        旋转菜单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.13" data-path="md/css/视口.html">
            
                
                    <a href="../../md/css/视口.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.13.</b>
                        
                        移动端
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.14" data-path="md/css/rem布局.html">
            
                
                    <a href="../../md/css/rem布局.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.14.</b>
                        
                        rem布局
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.15" data-path="md/css/权重与雪碧图.html">
            
                
                    <a href="../../md/css/权重与雪碧图.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.15.</b>
                        
                        权重问题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.16" data-path="md/css/移动底部菜单被系统键盘顶起问题.html">
            
                
                    <a href="../../md/css/移动底部菜单被系统键盘顶起问题.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.16.</b>
                        
                        移动端导航问题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.17" data-path="md/css/flex布局.html">
            
                
                    <a href="../../md/css/flex布局.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.17.</b>
                        
                        flex布局
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.18" data-path="md/css/fullpage的使用.html">
            
                
                    <a href="../../md/css/fullpage的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.18.</b>
                        
                        fullpage
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.19" data-path="md/css/bootstrap.html">
            
                
                    <a href="../../md/css/bootstrap.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.19.</b>
                        
                        bootstrap
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.20" data-path="md/css/媒体查询.html">
            
                
                    <a href="../../md/css/媒体查询.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.20.</b>
                        
                        媒体查询
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/js/js的介绍.html">
            
                
                    <a href="../../md/js/js的介绍.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        JavaScript的介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="3.1" data-path="md/js/JavaScript数据类型.html">
            
                
                    <a href="../../md/js/JavaScript数据类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        JavaScript数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="md/js/数据类型的转换.html">
            
                
                    <a href="../../md/js/数据类型的转换.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        数据类型的转换
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="md/js/运算符.html">
            
                
                    <a href="../../md/js/运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="md/js/比较运算符.html">
            
                
                    <a href="../../md/js/比较运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        比较运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="md/js/赋值运算符.html">
            
                
                    <a href="../../md/js/赋值运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        赋值运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="md/js/逻辑操作符.html">
            
                
                    <a href="../../md/js/逻辑操作符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        逻辑操作符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="md/js/条件语句.html">
            
                
                    <a href="../../md/js/条件语句.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        条件语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="md/js/条件运算符.html">
            
                
                    <a href="../../md/js/条件运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        条件运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="md/js/位运算符.html">
            
                
                    <a href="../../md/js/位运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        位运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="md/js/循环语句.html">
            
                
                    <a href="../../md/js/循环语句.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        循环语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="md/js/for循环.html">
            
                
                    <a href="../../md/js/for循环.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.11.</b>
                        
                        for循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="md/js/ES6.html">
            
                
                    <a href="../../md/js/ES6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.12.</b>
                        
                        ES6
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="md/js/es6安装.html">
            
                
                    <a href="../../md/js/es6安装.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.13.</b>
                        
                        ES6安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.14" data-path="md/js/内置对象.html">
            
                
                    <a href="../../md/js/内置对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.14.</b>
                        
                        内置对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.15" data-path="md/js/Array对象.html">
            
                
                    <a href="../../md/js/Array对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.15.</b>
                        
                        Array对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.16" data-path="md/js/Date对象.html">
            
                
                    <a href="../../md/js/Date对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.16.</b>
                        
                        Date对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.17" data-path="md/js/布尔值对象.html">
            
                
                    <a href="../../md/js/布尔值对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.17.</b>
                        
                        布尔值对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.18" data-path="md/js/数学对象.html">
            
                
                    <a href="../../md/js/数学对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.18.</b>
                        
                        数学对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.19" data-path="md/js/对象的创建.html">
            
                
                    <a href="../../md/js/对象的创建.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.19.</b>
                        
                        对象的创建
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.20" data-path="md/js/BOM.html">
            
                
                    <a href="../../md/js/BOM.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.20.</b>
                        
                        BOM
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.21" data-path="md/js/DOM关于元素的获取.html">
            
                
                    <a href="../../md/js/DOM关于元素的获取.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.21.</b>
                        
                        DOM关于元素的获取
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.22" data-path="md/js/DOM元素对象.html">
            
                
                    <a href="../../md/js/DOM元素对象.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.22.</b>
                        
                        DOM元素对象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.23" data-path="md/js/DOM事件练习.html">
            
                
                    <a href="../../md/js/DOM事件练习.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.23.</b>
                        
                        DOM事件练习
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.24" data-path="md/js/DOM鼠标事件.html">
            
                
                    <a href="../../md/js/DOM鼠标事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.24.</b>
                        
                        DOM鼠标事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.25" data-path="md/js/事件代理.html">
            
                
                    <a href="../../md/js/事件代理.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.25.</b>
                        
                        事件代理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.26" data-path="md/js/移动端事件.html">
            
                
                    <a href="../../md/js/移动端事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.26.</b>
                        
                        移动端事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.27" data-path="md/js/无缝轮播图.html">
            
                
                    <a href="../../md/js/无缝轮播图.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.27.</b>
                        
                        无缝轮播图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.28" data-path="md/js/鼠标事件练习.html">
            
                
                    <a href="../../md/js/鼠标事件练习.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.28.</b>
                        
                        鼠标事件练习
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.29" data-path="md/js/ajax.html">
            
                
                    <a href="../../md/js/ajax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.29.</b>
                        
                        ajax
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.30" data-path="md/js/封装ajax.html">
            
                
                    <a href="../../md/js/封装ajax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.30.</b>
                        
                        封装ajax
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.31" data-path="md/js/高德地图的使用.html">
            
                
                    <a href="../../md/js/高德地图的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.31.</b>
                        
                        高德地图的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.32" data-path="md/js/预加载插件使用.html">
            
                
                    <a href="../../md/js/预加载插件使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.32.</b>
                        
                        预加载插件使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="md/jQuery/JQ变量的声明.html">
            
                
                    <a href="../../md/jQuery/JQ变量的声明.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        JQ变量的声明
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="md/jQuery/选择器和效果.html">
            
                
                    <a href="../../md/jQuery/选择器和效果.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        选择器和效果
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="md/jQuery/属性.html">
            
                
                    <a href="../../md/jQuery/属性.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="md/jQuery/尺寸.html">
            
                
                    <a href="../../md/jQuery/尺寸.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        尺寸
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="md/jQuery/遍历.html">
            
                
                    <a href="../../md/jQuery/遍历.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        遍历
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="md/jQuery/正则表达式.html">
            
                
                    <a href="../../md/jQuery/正则表达式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        正则表达式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="md/jQuery/jQuery事件练习.html">
            
                
                    <a href="../../md/jQuery/jQuery事件练习.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        jQuery事件练习
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="md/jQuery/操作.html">
            
                
                    <a href="../../md/jQuery/操作.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="md/jQuery/事件.html">
            
                
                    <a href="../../md/jQuery/事件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.</b>
                        
                        事件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9" data-path="md/jQuery/ajax.html">
            
                
                    <a href="../../md/jQuery/ajax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.</b>
                        
                        ajax
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.10" data-path="md/jQuery/三级联动.html">
            
                
                    <a href="../../md/jQuery/三级联动.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.10.</b>
                        
                        三级联动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.11" data-path="md/jQuery/滚动监听导航效果.html">
            
                
                    <a href="../../md/jQuery/滚动监听导航效果.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.11.</b>
                        
                        滚动监听导航效果
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.12" data-path="md/jQuery/悬停导航.html">
            
                
                    <a href="../../md/jQuery/悬停导航.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.12.</b>
                        
                        悬停导航
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="md/Vue/修饰符与条件渲染.html">
            
                
                    <a href="../../md/Vue/修饰符与条件渲染.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        Vue修饰符与条件渲染
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="md/Vue/绑定class和style.html">
            
                
                    <a href="../../md/Vue/绑定class和style.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        绑定class和style
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="md/Vue/排序.html">
            
                
                    <a href="../../md/Vue/排序.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        排序
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="md/Vue/表单输入绑定.html">
            
                
                    <a href="../../md/Vue/表单输入绑定.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        表单输入绑定
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="md/Vue/生命周期.html">
            
                
                    <a href="../../md/Vue/生命周期.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        生命周期
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="md/Vue/自定义指令.html">
            
                
                    <a href="../../md/Vue/自定义指令.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        自定义指令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="md/Vue/组件.html">
            
                
                    <a href="../../md/Vue/组件.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        组件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.7" data-path="md/Vue/Vue事件练习.html">
            
                
                    <a href="../../md/Vue/Vue事件练习.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.7.</b>
                        
                        Vue事件练习
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.8" data-path="md/Vue/动态模板.html">
            
                
                    <a href="../../md/Vue/动态模板.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.8.</b>
                        
                        动态模板
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.9" data-path="md/Vue/插槽的使用.html">
            
                
                    <a href="../../md/Vue/插槽的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.9.</b>
                        
                        插槽的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.10" data-path="md/Vue/router.html">
            
                
                    <a href="../../md/Vue/router.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.10.</b>
                        
                        router
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.11" data-path="md/Vue/ajax与框架搭建.html">
            
                
                    <a href="../../md/Vue/ajax与框架搭建.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.11.</b>
                        
                        ajax与框架搭建
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.12" data-path="md/Vue/store.html">
            
                
                    <a href="../../md/Vue/store.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.12.</b>
                        
                        store
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.13" data-path="md/Vue/ref获取元素.html">
            
                
                    <a href="../../md/Vue/ref获取元素.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.13.</b>
                        
                        ref获取元素
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="md/wx/小程序.html">
            
                
                    <a href="../../md/wx/小程序.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        小程序
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="md/wx/封装外部ajax路径.html">
            
                
                    <a href="../../md/wx/封装外部ajax路径.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        封装外部ajax路径
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="md/wx/练习.html">
            
                
                    <a href="../../md/wx/练习.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="md/Egret/canvas.html">
            
                
                    <a href="../../md/Egret/canvas.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        canvas
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="md/Egret/async.html">
            
                
                    <a href="../../md/Egret/async.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        async
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="md/Egret/显示对象与容器.html">
            
                
                    <a href="../../md/Egret/显示对象与容器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        显示对象与容器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="md/Egret/01.基础.html">
            
                
                    <a href="../../md/Egret/01.基础.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        01.基础
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="md/Egret/02.对象池.html">
            
                
                    <a href="../../md/Egret/02.对象池.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        02.对象池
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.5" data-path="md/Egret/03.typeScript.html">
            
                
                    <a href="../../md/Egret/03.typeScript.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.5.</b>
                        
                        03.typeScript
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.6" data-path="md/Egret/04.场景管理类.html">
            
                
                    <a href="../../md/Egret/04.场景管理类.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.6.</b>
                        
                        04.场景管理类
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="gitbook的安装.html">
            
                
                    <a href="../../gitbook的安装.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        gitbook的安装
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >个人笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <pre><code>         *JavaScript&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF08;2&#x79CD;&#xFF09;

         * &#x539F;&#x59CB;&#x7C7B;&#x578B;&#x548C;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x4ED6;&#x4EEC;&#x7684;&#x50A8;&#x5B58;&#x65B9;&#x5F0F;&#x4E0D;&#x4E00;&#x6837;&#xFF0C;&#x539F;&#x59CB;&#x7C7B;&#x578B;&#x7684;&#x662F;&#x50A8;&#x5B58;&#x5728;&#x6808;&#x91CC;&#x9762;&#x7684;&#xFF0C;

         * &#x5F15;&#x7528;&#x7C7B;&#x578B;&#x662F;&#x50A8;&#x5B58;&#x5728;&#x5806;&#x91CC;&#x9762;&#x7684;&#x3002;
         * 
         * 1&#x3001;&#x7B80;&#x5355;&#x6570;&#x636E;&#x7C7B;&#x578B;(&#x539F;&#x59CB;&#x7C7B;&#x578B;)

         *     a&#x3001;&#x5B57;&#x7B26;&#x4E32;(string)

         *         &#x7528;&#x5F15;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#x7684;&#x5C31;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x5305;&#x62EC;&#x5355;&#x53CC;&#x5F15;&#x53F7;&#x3002;

         * &#x6CE8;&#x610F;&#xFF1A;&#x53CC;&#x5F15;&#x53F7;&#x4E0D;&#x80FD;&#x5D4C;&#x5957;&#x53CC;&#x5F15;&#x53F7;&#xFF0C;&#x5355;&#x5F15;&#x53F7;&#x4E5F;&#x4E0D;&#x53EF;&#x4EE5;&#x5D4C;&#x5957;&#x5355;&#x5F15;&#x53F7;&#xFF0C;&#x4F46;&#x662F;&#x53EF;&#x4EE5;&#x4EA4;&#x53C9;&#x5D4C;&#x5957;&#x3002;
         * 
         * b&#x3001;&#x6570;&#x503C;&#x7C7B;&#x578B;(Number)

         *         var num = 123;

         *         var num = 12.34;

         *         &#x4E5F;&#x53EF;&#x4EE5;&#x7528;&#x5176;&#x4ED6;&#x8FDB;&#x5236;&#x8868;&#x793A;&#xFF0C;&#x6BD4;&#x5982;16&#x8FDB;&#x5236;&#x7B49;

         *     &#x6709;&#x4E09;&#x4E2A;&#x7279;&#x6B8A;&#x503C;

         *     +Infinity,&#x6B63;&#x65E0;&#x7A77;&#x5927;

         *     -Infinity,&#x8D1F;&#x65E0;&#x7A77;&#x5927;

         *     NaN&#xFF1A;&#x8868;&#x793A;&#x4E0D;&#x662F;&#x4E00;&#x4E2A;&#x6570;&#x503C;&#xFF0C;&#x4F46;&#x662F;&#x4ED6;&#x7684;&#x7C7B;&#x578B;&#x662F;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x3002;
         * 
         * isNaN&#xFF08;&#xFF09;&#x65B9;&#x6CD5;&#x7528;&#x4E8E;&#x68C0;&#x67E5;&#x5176;&#x53C2;&#x6570;&#x7684;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x662F;&#x5426;&#x4E3A;&#x975E;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x3002;
         * 
         * c&#x3001;&#x5E03;&#x5C14;&#x503C;(boolean)

         *         &#x53EA;&#x6709;&#x4E24;&#x4E2A;&#x503C;&#xFF1A;true(&#x771F;)&#xFF0C;false(&#x5047;)
         * 
         * d&#x3001;undefiend,&#x8868;&#x793A;&#x53D8;&#x91CF;&#x672A;&#x8D4B;&#x503C;&#x7684;&#x9ED8;&#x8BA4;&#x503C;,&#x4E5F;&#x53EF;&#x4EE5;&#x4EE3;&#x8868;&#x7A7A;&#x3002;
         * 
         * D&#x3001;null&#xFF0C;&#x7A7A;&#xFF0C;&#x8868;&#x793A;&#x5BF9;&#x7A7A;&#x5BF9;&#x8C61;&#x7684;&#x5F15;&#x7528;&#x3002;

         *         &#x901A;&#x5E38;&#x53EF;&#x4EE5;&#x7528;null&#x6765;&#x6E05;&#x7A7A;&#x6570;&#x636E;&#x3002;
         * 
         * 2&#x3001;&#x590D;&#x6742;&#x6570;&#x636E;&#x7C7B;&#x578B;(&#x5F15;&#x7528;&#x7C7B;&#x578B;)

         *         a&#x3001;&#x5BF9;&#x8C61;(object)&#xFF0C;&#x662F;&#x5C5E;&#x6027;&#x548C;&#x65B9;&#x6CD5;&#x7684;&#x96C6;&#x5408;&#x3002;
         * 
         * &#x5224;&#x65AD;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;typeof()&#x65B9;&#x6CD5;&#x6765;&#x5F97;&#x5230;&#x3002;
</code></pre><pre><code>&lt;style type=&quot;text/css&quot;&gt;
            .test{
                width: 200px;
                height: 200px;
                background: skyblue;
            }
        &lt;/style&gt;
&lt;div class=&quot;web&quot;&gt;
            &lt;div class=&quot;test&quot; id=&quot;test&quot;&gt;&#x70B9;&#x51FB;&#x6211;&#x6539;&#x53D8;&#x989C;&#x8272;&lt;/div&gt;
        &lt;/div&gt;

        &lt;script type=&quot;text/javascript&quot;&gt;
            var onColor = true;
            //&#x4E00;&#x4E2A;&#x7B49;&#x53F7;&#x662F;&#x8D4B;&#x503C;&#xFF0C;&#x4E24;&#x4E2A;&#x7B49;&#x53F7;&#x662F;&#x5224;&#x65AD;&#x3002;
            document.getElementById(&quot;test&quot;).onclick = function(){
                if(onColor == true){
                    document.getElementById(&quot;test&quot;).style.background = &quot;pink&quot;;
//                    onColor = false;
                }else{
                    document.getElementById(&quot;test&quot;).style.background = &quot;skyblue&quot;;
//                    onColor = true;
                }
                //!&#x8868;&#x793A;&#x53D6;&#x53CD;&#xFF0C;&#x5373;&#x662F;&#x771F;&#x53D6;&#x53CD;&#x540E;&#x4E3A;&#x5047;
                onColor = !onColor;
            }

            var str = &quot;&quot;;
            var str1 = &apos; &apos;;
            console.log(str1,typeof(str1));
            console.log(str,typeof(str));  //string

            var str2 = &quot;welcome to &apos;guangzhou&apos;&quot;;
            var str3 = &apos;welcome to &quot;guangzhou&quot;&apos;;
            console.log(str2);
            console.log(str3);


            var num =123;
            console.log(num,typeof(num));//number
            var num1 = &quot;123&quot;;
            console.log(num1,typeof(num1));//string

            var num2 = 789;
            //+ &#x4EE3;&#x8868;&#x52A0;&#x6CD5;&#x8FD0;&#x7B97;
            console.log(num+num2);//912
            //&#x5B57;&#x7B26;&#x4E32;&#x62FC;&#x63A5;&#xFF0C;&#x52A0;&#x53F7;&#xFF08;+&#xFF09;&#x5C31;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x62FC;&#x63A5;&#x7B26;
            console.log(num+num1);//123123

            var person = &quot;&#x82F1;&#x96C4;&quot;;

            console.log(num1+person+num+num2);//&#x76F4;&#x63A5;&#x5B57;&#x7B26;&#x4E32;&#x62FC;&#x63A5;
            console.log(num+num2+num1+person);//&#x5148;&#x6570;&#x503C;&#x76F8;&#x52A0;&#x518D;&#x62FC;&#x63A5;&#x5B57;&#x7B26;&#x4E32;

            document.write(&quot;&#x6211;&#x662F;&#x4E00;&#x4E2A;&quot;+person+&quot;!&quot;);

            var good = &quot;&#x597D;&quot;;
            var friend = &quot;&#x5973;&#x670B;&#x53CB;&quot;;
            var go = &quot;&#x563F;&#x563F;&#x563F;&quot;;
            //document.write&#x662F;&#x8BC6;&#x522B;&#x6807;&#x7B7E;
            document.write(&quot;&#x4ECA;&#x5929;&#x5929;&#x6C14;&#x771F;&#x597D;&#xFF0C;&#x6211;&#x8981;&#x8DDF;&#x5973;&#x670B;&#x53CB;&#x53BB;&#x7EA6;&#x4F1A;&#xFF01;&quot;)

            document.write(&quot;&#x4ECA;&#x5929;&#x5929;&#x6C14;&#x771F;&quot;+good+&quot;,&lt;br /&gt;&#x6211;&#x8981;&#x8DDF;&quot;+friend+&quot;&#x53BB;&quot;+go+&quot;!&quot;)

            var bool = true;
            console.log(typeof(bool));//boolean
            var bool1 = &quot;true&quot;;
            console.log(typeof(bool1));//&#x5F15;&#x53F7;&#x5F15;&#x8D77;&#x4E86;&#x7684;&#x90FD;&#x662F;&#x5B57;&#x7B26;&#x4E32; string

            var age = undefined;
            console.log(typeof(age));
            var userName;
            console.log(userName);

            var sex = null;
            console.log(typeof(sex));//object
            console.log(sex);
            //&#x4E24;&#x4E2A;&#x7B49;&#x4E8E;&#x53F7;&#x8868;&#x793A;&#x5224;&#x65AD;&#x7B49;&#x4E8E;&#xFF0C;&#x53EA;&#x5224;&#x65AD;&#x503C;
            console.log(undefined == null);//true
            //&#x4E09;&#x4E2A;&#x7B49;&#x4E8E;&#x53F7;&#x8868;&#x793A;&#x5224;&#x65AD;&#x5168;&#x7B49;&#x4E8E;&#xFF0C;&#x5373;&#x5224;&#x65AD;&#x6570;&#x503C;&#x5224;&#x65AD;&#x7C7B;&#x578B;
            console.log(undefined === null);//false

            console.log(123 === &quot;123&quot;);//false,&#x6570;&#x636E;&#x7C7B;&#x578B;&#x4E0D;&#x4E00;&#x6837;&#x3002;
            console.log(123 == &quot;123&quot;);//true

            /*
             *&#x5341;&#x516D;&#x8FDB;&#x5236;&#x7531;0&#xB7;9&#x548C;A~F&#x8868;&#x793A;&#xFF0C;A~F&#x5C31;&#x662F;&#x4EE3;&#x8868;&#x6570;&#x503C;10~15
             * &#x901A;&#x5E38;&#x5F00;&#x5934;&#x4E3A;0x&#x4EE3;&#x8868;&#x7684;&#x662F;&#x5341;&#x516D;&#x8FDB;&#x5236;&#x3002;
             * 
             * */
            var num = 0x123;
            //&#x5341;&#x516D;&#x8FDB;&#x5236;&#x8F6C;&#x5316;&#x4E3A;10&#x8FDB;&#x5236;&#xFF1A;1*16^2+2*16^1+3*16^0=291
            console.log(typeof(num),num);//number 291
            var num1 = 0x678f;
            //&#x8F6C;&#x6362;&#x4E3A;10&#x8FDB;&#x5236;&#xFF1A;6*16^3+7*16^2+8*16^1+15*16^0

            //8&#x8FDB;&#x5236;&#xFF0C;&#x9022;8&#x8FDB;&#x4E00;,&#x901A;&#x5E38;&#x4EE5;0&#x5F00;&#x5934;&#x3002;
            //&#x5341;&#x8FDB;&#x5236;&#x7684;8&#x7528;&#x516B;&#x8FDB;&#x5236;&#x6765;&#x4EE3;&#x8868;

            var num2 = 010;
            console.log(num2);//8

            var num6 = &quot;&#x6587;&#x5B57;&quot;;
            //isNaN() &#x51FD;&#x6570;&#x7528;&#x4E8E;&#x68C0;&#x67E5;&#x5176;&#x53C2;&#x6570;&#x662F;&#x5426;&#x662F;&#x975E;&#x6570;&#x5B57;&#x503C;&#x3002;
            //&#x6570;&#x5B57;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x7C7B;&#x578B;&#x7684;&#x53D8;&#x91CF;&#x7528;&#x4E8E;&#x5224;&#x65AD;&#x7684;&#x65F6;&#x5019;&#x4F1A;&#x9690;&#x5F0F;&#x8F6C;&#x6362;&#x4E3A;&#x6570;&#x503C;&#x7C7B;&#x578B;&#x3002;
            console.log(isNaN(num6));//true

            var num3 = +Infinity;//&#x6B63;&#x65E0;&#x7A77;&#x5927;
            var num4 = -Infinity;//&#x8D1F;&#x65E0;&#x7A77;&#x5927;
            console.log(num3,num4);

            var unm5 = NaN;
            console.log(typeof(unm5));//number


            var obj = {
                name:&quot;html&quot;,
                age:&quot;18&quot;
            }
            console.log(typeof(obj));//object

            var obj1 = obj;
            console.log(obj,obj1);

            var num = 123;
            var num1 = num;
            console.log(num,num1);
            num1 = 789;
            console.log(num);//123

            obj1.age = &quot;28&quot;;
            console.log(obj);
        &lt;/script&gt;
</code></pre><p>*&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF1A;</p>
<pre><code>         *     &#x7B80;&#x5355;&#x6570;&#x636E;&#x7C7B;&#x578B;

         *         1&#x3001;&#x5B57;&#x7B26;&#x4E32;&#xFF08;string&#xFF09;

         *         2&#x3001;&#x6570;&#x503C;&#xFF08;number&#xFF09;

         *         3&#x3001;&#x5E03;&#x5C14;&#x503C;&#xFF08;Boolean&#xFF09;

         *         4&#x3001;undefined

         *             &#x5728;&#x5B9A;&#x4E49;&#x53D8;&#x91CF;&#x540E;&#x672A;&#x8D4B;&#x503C;&#x7684;&#x65F6;&#x5019;&#xFF0C;JavaScript&#x4F1A;&#x81EA;&#x52A8;&#x7ED9;&#x53D8;&#x91CF;&#x8D4B;&#x503C;&#x4E3A;undefined

         *         5.null

         *             JavaScript&#x6709;&#x5783;&#x573E;&#x81EA;&#x52A8;&#x56DE;&#x6536;&#x673A;&#x5236;&#xFF0C;&#x5728;&#x53D8;&#x91CF;&#x4E0D;&#x9700;&#x8981;&#x4F7F;&#x7528;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x7CFB;&#x7EDF;&#x4F1A;&#x81EA;&#x52A8;&#x628A;&#x6B64;&#x53D8;&#x91CF;&#x8D4B;&#x503C;&#x4E3A;null&#xFF08;&#x5373;&#x6E05;&#x7A7A;&#x6539;&#x53D8;&#x91CF;&#xFF09;
         *         
         *     &#x590D;&#x6742;&#x6570;&#x636E;&#x7C7B;&#x578B;

         *         1&#x3001;&#x5BF9;&#x8C61;&#xFF08;object&#xFF09;&#x5C5E;&#x6027;&#x548C;&#x65B9;&#x6CD5;&#x7684;&#x96C6;&#x5408;&#x3002;

         *             &#x8BED;&#x6CD5;&#xFF1A;&#x952E;&#x503C;&#x5BF9;&#x5199;&#x6CD5;&#xFF0C;&#x5373;&#xFF1A;&quot;&#x952E;&#x540D;&quot;&#xFF1A;&quot;&#x952E;&#x503C;&quot;&#x3002;

         *             &#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;.&#xFF08;&#x70B9;&#x6765;&#x64CD;&#x4F5C;&#x7B26;&#xFF09;&#x6765;&#x8BBF;&#x95EE;&#x5BF9;&#x8C61;&#x4E0A;&#x7684;&#x5C5E;&#x6027;&#x6216;&#x8005;&#x65B9;&#x6CD5;

         *             &#x600E;&#x4E48;&#x6765;&#x8C03;&#x7528;&#x5BF9;&#x8C61;&#x91CC;&#x9762;&#x7684;&#x65B9;&#x6CD5;

         *                 &#x901A;&#x8FC7;&#x5BF9;&#x8C61;&#x7684;&#x65B9;&#x6CD5;&#x540D;&#x540E;&#x9762;&#x52A0;&#x4E2A;&#x5C0F;&#x62EC;&#x53F7;&#x6765;&#x6267;&#x884C;&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x3002;

         *             return&#x7528;&#x6765;&#x5B9A;&#x4E49;&#x51FD;&#x6570;&#x7684;&#x8FD4;&#x56DE;&#x503C;&#x3002;
         *         
         *         2&#x3001;&#x6570;&#x7EC4;&#xFF08;array&#xFF09;&#xFF0C;&#x4E5F;&#x662F;&#x6570;&#x636E;&#x7684;&#x96C6;&#x5408;

         *             &#x6570;&#x7EC4;&#x7684;&#x4E0B;&#x6807;&#x662F;&#x4ECE;0&#x5F00;&#x59CB;&#x4E5F;&#x5C31;&#x662F;&#x5E8F;&#x5217;&#x53F7;&#xFF0C;&#x6570;&#x7EC4;&#x957F;&#x5EA6;(length)&#x7684;&#x8BA1;&#x7B97;&#x662F;&#x4ECE;1&#x5F00;&#x59CB;&#x8BA1;&#x7B97;&#x7684;&#x3002;

         *             &#x600E;&#x4E48;&#x83B7;&#x53D6;&#x6570;&#x7EC4;&#x91CC;&#x9762;&#x7684;&#x6570;&#x636E;&#xFF1F;

                     //&#x83B7;&#x53D6;&#x6570;&#x7EC4;&#x957F;&#x5EA6;

                    console.log(arr.length);

                    var str = &quot;123&quot;;

                    //&#x5B57;&#x7B26;&#x4E32;&#x4E5F;&#x80FD;&#x83B7;&#x53D6;&#x5176;&#x5B57;&#x7B26;&#x957F;&#x5EA6;

                    console.log(str.length,str[1]);

         *                 &#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x6570;&#x7EC4;&#x540D;&#x52A0;&#x4E2D;&#x62EC;&#x53F7;&#xFF0C;&#x62EC;&#x53F7;&#x91CC;&#x9762;&#x586B;&#x4E0B;&#x6807;&#x503C;&#x3002;
         *             
         *         3&#x3001;function(&#x51FD;&#x6570;)&#xFF0C;&#x5177;&#x6709;&#x4E00;&#x5B9A;&#x529F;&#x80FD;&#x7684;&#x4EE3;&#x7801;&#x5757;&#x3002;

         *                 &#x8BED;&#x6CD5;&#xFF1A;&#x901A;&#x8FC7;&#x5173;&#x952E;&#x5B57;function&#x6765;&#x5B9A;&#x4E49;&#xFF0C;&#x5982;&#x4E0B;&#xFF1A;

         *                         &#x51FD;&#x6570;&#x540D;&#x548C;&#x53C2;&#x6570;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;

         *                     function &#x51FD;&#x6570;&#x540D;(&#x53C2;&#x6570;){

         *                             &#x4E66;&#x5199;&#x529F;&#x80FD;&#x4EE3;&#x7801;&#x533A;&#x57DF;

         *                         }

         *                 return&#x7528;&#x6765;&#x5B9A;&#x4E49;&#x51FD;&#x6570;&#x7684;&#x8FD4;&#x56DE;&#x503C;&#xFF0C;&#x4EE5;&#x53CA;&#x7ED3;&#x675F;&#x51FD;&#x6570;&#x7684;&#x6267;&#x884C;&#x3002;

        //&#x5B9A;&#x4E49;&#x4E86;&#x4E00;&#x4E2A;&#x51FD;&#x6570;&#xFF0C;&#x5C31;&#x76F8;&#x5F53;&#x4E8E;&#x751F;&#x4EA7;&#x4E86;&#x4E00;&#x53F0;&#x673A;&#x5668;&#x3002;

        function myFun(){
</code></pre><p>//                alter&#x5F39;&#x7A97;&#x4F1A;&#x963B;&#x6B62;js&#x4EE3;&#x7801;&#x7684;&#x8FD0;&#x884C;</p>
<pre><code>            alert(&quot;hello world!&quot;);

            return &quot;&#x4F60;&#x597D;&quot;;

        }

        //&#x6267;&#x884C;&#x51FD;&#x6570;,&#x76F8;&#x5F53;&#x4E8E;&#x6309;&#x4E0B;&#x673A;&#x5668;&#x7684;&#x8FD0;&#x4F5C;&#x5F00;&#x5173;&#x3002;

         console.log(myFun());

         /*
         *&#x533F;&#x540D;&#x51FD;&#x6570;

         *         &#x4E0D;&#x80FD;&#x76F4;&#x63A5;&#x5B9A;&#x4E49;&#x533F;&#x540D;&#x51FD;&#x6570;&#xFF0C;&#x9700;&#x8981;&#x6709;&#x4E8B;&#x4EF6;&#x89E6;&#x53D1;&#x7684;&#x65F6;&#x5019;&#x624D;&#x53EF;&#x4EE5;&#xFF0C;&#x6216;&#x8005;&#x662F;&#x8D4B;&#x503C;&#x7ED9;&#x4E00;&#x4E2A;&#x53D8;&#x91CF;&#x3002;

         *         &#x533F;&#x540D;&#x51FD;&#x6570;&#x53EA;&#x80FD;&#x5728;&#x51FD;&#x6570;&#x5B9A;&#x4E49;&#x7684;&#x540E;&#x9762;&#x8FDB;&#x884C;&#x8C03;&#x7528;&#x3002;

         *         &#x5177;&#x540D;&#x51FD;&#x6570;&#x65E0;&#x8BBA;&#x5728;&#x54EA;&#x91CC;&#x90FD;&#x53EF;&#x4EE5;&#x8C03;&#x7528;&#x3002;
         * */
</code></pre><p>//                fun();&#x8C03;&#x7528;&#x4F1A;&#x62A5;&#x9519;</p>
<pre><code>        var fun = function(){

            console.log(&quot;&#x6211;&#x662F;&#x4E00;&#x4E2A;&#x533F;&#x540D;&#x51FD;&#x6570;&quot;);

        }
        fun();

     *&#x51FD;&#x6570;&#x7684;&#x53C2;&#x6570;

     *         &#x53EF;&#x4EE5;&#x53C8;&#x591A;&#x4E2A;&#xFF0C;&#x53C2;&#x6570;&#x4E4B;&#x95F4;&#x7528;&#x9017;&#x53F7;&#x9694;&#x5F00;

     *         &#x5B9A;&#x4E49;&#x51FD;&#x6570;&#x65F6;&#x5199;&#x7684;&#x53C2;&#x6570;&#x6211;&#x4EEC;&#x79F0;&#x4E3A;&#x5F62;&#x53C2;

     *         &#x5F53;&#x6211;&#x4EEC;&#x8981;&#x8C03;&#x7528;&#x7684;&#x51FD;&#x6570;&#x65F6;&#x4F20;&#x5165;&#x7684;&#x53C2;&#x6570;&#x79F0;&#x4E3A;&#x5B9E;&#x53C2;
     * */
        function testFun(username,age,sex){//&#x5F62;&#x53C2;

            return &quot;&#x4F60;&#x597D;&#xFF0C;&#x6211;&#x662F;&quot;+username+&quot;&#xFF0C;&#x4ECA;&#x5E74;&quot;+age+&quot;&#x5C81;&#xFF0C;&#x6027;&#x522B;&quot;+sex+&quot;&quot;;

        }

         console.log(testFun(&quot;&#x5C0F;&#x767D;&quot;,10,&quot;&#x7537;&quot;));//&#x5B9E;&#x53C2;

         var uName = &quot;&#x5218;&quot;;

     document.write(testFun(uName,10,&quot;&#x7537;&quot;));
</code></pre><pre><code>    var obj ={
                &quot;name&quot; :&quot;&#x5C0F;&#x82B3;&quot;,//&#x524D;&#x9762;&#x7684;&#x662F;&#x952E;&#x540D;//&#x952E;&#x503C;
                &quot;age&quot;:&quot;18&quot;,
                &quot;skill&quot;:function(){//&#x65B9;&#x6CD5;
                    console.log(&quot;&#x505A;&#x83DC;&quot;);
//                    return &quot;&#x6211;&#x662F;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&quot;
                    return &quot;obj&quot; //return&#x8FD4;&#x56DE;
                }
            }
            console.log(obj.age,obj.name);
            console.log(obj.skill);//&#x8BBF;&#x95EE;skill&#x65B9;&#x6CD5;
            console.log(obj.skill());//&#x6267;&#x884C;skill&#x65B9;&#x6CD5;
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/js/js的介绍.html" class="navigation navigation-prev " aria-label="Previous page: JavaScript的介绍"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/js/数据类型的转换.html" class="navigation navigation-next " aria-label="Next page: 数据类型的转换"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
